import request from '@/utils/request'

// 获取列表
export function classiFicationList(data) {
  return request.get(`/categories?_limit=${data.limit}&_start=${data.start}&title_contains=${data.title}`)
}

// 获取分类数量
export function getCount(data) {
  return request.get(`/categories/count?title_contains=${data.title}`)
}

// 新增
export function addClassiFication(data) {
  return request.post('/categories', data)
}

// 详情
export function getDetail(id) {
  return request.get(`/categories/${id}`)
}

// 删除
export function delclassiFication(id) {
  return request.delete(`/categories/${id}`)
}

// 指定搜索
export function getSpecified(id) {
  return request.get(`/categories/${id}`)
}

// 编辑
export function editclassiFication(data) {
  return request.put(`/categories/${data.id}`, data)
}

